package com.xiaoyu.awakening.ai.evaluation.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author wangxiaoyu
 * @date 2025/8/20 17:09
 * @since v1.0
 */
@Data
public class EvalDataSetGenerateContext implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @JsonProperty("task_code")
    private String taskCode;
    @JsonProperty("user_id")
    private String userId;
    private List<DataSetSample> samples;
    @JsonProperty("callback_url")
    private String callbackUrl;
    @JsonProperty(value = "metrics", defaultValue = "[]")
    private List<String> metrics;
    @JsonProperty("auto_choose_metrics")
    private Boolean autoChooseMetrics = true;
    @JsonIgnore
    private List<EvalQaPairDTO> qaPairDTOList;

    @Data
    public static class DataSetSample {
        @JsonProperty("user_input")
        private String userInput;
        @JsonProperty(value = "retrieved_contexts", defaultValue = "[]")
        private List<String> retrievedContexts;
        @JsonProperty(value = "reference_contexts", defaultValue = "[]")
        private List<String> referenceContexts;
        @JsonProperty("reference")
        private String reference;
        @JsonProperty("response")
        private String response;
        @JsonProperty("multi_responses")
        private List<String> multiResponses;
    }
}
